import java.util.*;
class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        String ret = "";
        String cur = "";
        int i = 0;
        for(;i < str.length();i++) {
            char ch = str.charAt(i);
            if(ch >= '0' && ch <= '9') {
                cur = cur + ch+"";
            }else{
                if(ret.length() < cur.length()) {
                    ret = cur;
                }
                cur = "";
            }
        }

        if(i== str.length() && ret.length()< cur.length()) {
            ret = cur;
        }

        System.out.println(ret);
    }
}

class Solution {
    public int MoreThanHalfNum_Solution(int [] array) {

//        if(array == null || array.length == 0) {
//            return 0;
//        }
//        Arrays.sort(array);
//        int len = array.length;
//        int midNum = array[len/2];
//        int count = 0;
//        for(int i = 0;i < len;i++) {
//            if(array[i] == midNum) {
//                count++;
//            }
//        }
//        if(count > len/2) {
//            return midNum;
//        }
//        return 0;
//    }


        if(array == null || array.length==0) {
            return 0;

        }
        int result = array[0];
        int times = 1; // 次数
        for(int i=1;i<array.length;++i){
            if(times != 0){
                if(array[i] == result) {
                    ++times; // 相同则加1
                }else{
                    --times; // 不同则减1
                }
            }
            else {
// 更新result的值为当前元素，并置次数为1
                result = array[i];
                times = 1;
            }
        }
// 判断result是否符合条件，即出现次数大于数组长度的一半
        times = 0;
        for(int i=0;i<array.length;++i){
            if(array[i] == result) ++times;
        }
        return (times > array.length/2) ? result : 0;
    }
}


//import java.util.*;
class Main1{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();
        int A = (a + c)/2;
        int B1 = (b + d)/2;
        int B2 = (c - a)/2;
        int C = (d - b)/2;
        if (B1 != B2){
            System.out.println("No");
        }else{
            System.out.println(A + " " + B1 + " " + C);
        }
    }
}
public class Test0911 {

}
